<template>
	<div class="flex-1 oflow_y" ref="list" @scroll="onScroll">
</template>
<!-- F:/MyWork/gongshang_zhxg/src/view/goBack/teacher/clazzTeacher.vue -->
<script>
	// 滚动事件
	onScroll() {
	  let scrollTop = this.$refs.list.scrollTop;
	  let offsetHeight = this.$refs.list.offsetHeight;
	  let scrollHeight = this.$refs.list.scrollHeight;
	  if (scrollTop + offsetHeight + 50 >= scrollHeight && this.isLoadMore) {
	    if (this.queryParams.pageNum < Math.ceil(this.total / 20)) {
	      this.getMore();
	      this.isLoadMore = false;
	    }
	  }
	},
	// 加载更多
	getMore() {
	  this.queryParams.pageNum++
	  const toast = this.$createToast({ time: 0, txt: '', mask: true }).show();
	  this.$post(this.HOST + '/t/health/getHealthAuditStudentList', this.queryParams).then(res => {
	    toast.hide()
	    if(res.code === 0) {
	      let dataList = res.rows
	      dataList.map(e=>{
	        this.$set(e, 'isSelect', false)
	      })
	      this.list.push(...dataList)
	      this.isLoadMore = true
	    }else{
	      this.$func.showToast(this, res.msg)
	    }
	  })
	},
	
</script>

<style>
</style>
